<%--
Created by IntelliJ IDEA.
User: jt
Date: 2021/1/26
Time: 10:20
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!doctype html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>商家后台管理</title>
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
</head>
<body>
    <script>
<%--        验证--%>
        function yanzhen() {
            if(getCookie("user")){
                console.log("允许操作");
            }
            else{
                alert("非法操作,请先登录");
                window.location.href="../login.jsp";
            }

        }
        yanzhen();
        function setCookie(name,value,time){
            var strsec = getsec(time);
            var exp = new Date();
            exp.setTime(exp.getTime() + strsec*1);
            document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
        }

        function getsec(str){
            // alert(str);
            var str1=str.substring(1,str.length)*1;
            var str2=str.substring(0,1);
            if (str2=="s"){
                return str1*1000;
            }else if (str2=="h"){
                return str1*60*60*1000;
            }else if (str2=="d"){
                return str1*24*60*60*1000;
            }
        }

        //读取cookie
        function getCookie(name)
        {
            var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
            if(arr=document.cookie.match(reg))
                return unescape(arr[2]);
            else
                return null;
        }
        // 删除cookie
        function delCookie(name)
        {
        var exp = new Date();
        exp.setTime(exp.getTime() - 1);
        var cval=getCookie(name);
        if(cval!=null)
        document.cookie= name + "="+cval+";expires="+exp.toGMTString();
        }

        function exit(){
            delCookie("user");
            window.location.href="../login.jsp"
        }
    </script>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.jsp" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="index.jsp">首页</a></li>
                <li><a href="#" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="#">管理员</a></li>
                <!-- <li><a href="#">修改密码</a></li> -->
                <li><a href="#" onclick="exit()">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="design.jsp"><i class="icon-font">&#xe001;</i>我的展馆</a></li>
                        <li><a href="design.jsp"><i class="icon-font">&#xe001;</i>我的展位</a></li>
                        <li><a href="design.jsp"><i class="icon-font">&#xe001;</i>会展发布</a></li>
                        
                    </ul>
                </li>
   
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font">&#xe06b;</i><span>欢迎登录</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>快捷操作</h1>
            </div>
            <div class="result-content">
                <div class="short-wrap">
                    <a href="insert.jsp"><i class="icon-font">&#xe001;</i>我的会馆</a>
                    <a href="insert.jsp"><i class="icon-font">&#xe005;</i>会展发布</a>
                  
                </div>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>系统基本信息</h1>
            </div>
            <div class="result-content">
                <ul class="sys-info-list">
                    <li>
                        <label class="res-lab">机构署名</label><span class="res-info">张家口国际会展</span>
                    </li>
                    <li>
                        <label class="res-lab">地址</label><span class="res-info">河北省张家口蔚县</span>
                    </li>
              
                </ul>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>使用帮助</h1>
            </div>
            <div class="result-content">
                <ul class="sys-info-list">
                    <li>
                        
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>